package com.itheima.day08.myTreeSet.test6;

public class ReportCard {
        private String name;
        private double language; // 语文
        private double mathematics; // 数学
        private double english;

    public ReportCard() {
    }

    public ReportCard(String name, double language, double mathematics, double english) {
        this.name = name;
        this.language = language;
        this.mathematics = mathematics;
        this.english = english;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getLanguage() {
        return language;
    }

    public void setLanguage(double language) {
        this.language = language;
    }

    public double getMathematics() {
        return mathematics;
    }

    public void setMathematics(double mathematics) {
        this.mathematics = mathematics;
    }

    public double getEnglish() {
        return english;
    }

    public void setEnglish(double english) {
        this.english = english;
    }

    @Override
    public String toString() {
        return "ReportCard{" +
                "name='" + name + '\'' +
                ", language=" + language +
                ", mathematics=" + mathematics +
                ", english=" + english +
                '}' + " 总分=" + getSum();
    }

    public double getSum(){
        return language + mathematics + english;
    }
}
